package com.atguigu.yygh.model.hosp;

import com.atguigu.yygh.model.base.BaseEntity;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import io.swagger.models.auth.In;
import lombok.Data;

import java.time.LocalTime;
import java.util.Date;

@Data
@ApiModel(description = "报修订单")
@TableName("user_order")
public class Order extends BaseEntity {
    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "学生id")
    @TableField("student_id")
    private String studentId;

    @ApiModelProperty(value = "公寓编号")
    @TableField("apartment_code")
    private String apartmentCode;

    @ApiModelProperty(value = "寝室编号")
    @TableField("chamber_code")
    private String chamberCode;

    @ApiModelProperty(value = "姓名")
    @TableField("name")
    private String name;

    @ApiModelProperty(value = "手机号")
    @TableField("phone")
    private String phone;

    @ApiModelProperty(value = "问题描述")
    @TableField("description")
    private String description;

    @ApiModelProperty(value = "预约日期")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @TableField("date")
    private String date;

    @ApiModelProperty(value = "问题图片")
    @TableField("image_url")
    private String imageUrl;

    @ApiModelProperty(value = "订单状态")
    @TableField("status")
    private Integer status;

    @Override
    public String toString() {
        return "Order{" +
                "studentId='" + studentId + '\'' +
                ", apartmentCode='" + apartmentCode + '\'' +
                ", chamberCode='" + chamberCode + '\'' +
                ", name='" + name + '\'' +
                ", phone='" + phone + '\'' +
                ", description='" + description + '\'' +
                ", date=" + date +

                ", imageUrl='" + imageUrl + '\'' +
                ", status=" + status +
                '}';
    }
}
